package ltd.bean;

import io.netty.channel.socket.SocketChannel;
import ltd.entity.User;

import java.net.InetSocketAddress;
import java.util.Date;


/**
 * 连接数据对象
 */
public class Session {
	
	private String sessionId;		//唯一ID
	private boolean type = false;	//类型
	private int gameid;				//游戏ID
	private String iphost;			//IP地址
	private int port;				//端口号
	private int loginGameId;		//登录游戏ID
	private User user;				//用户对象
    private Date createDate;		//创建时间
    private InetSocketAddress ipAddress;//连接地址
    private SocketChannel channel;	//连接通道
    private boolean nu = false; //是否为新用户
    
	public String getSessionId() {
		return sessionId;
	}
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}
	public boolean isType() {
		return type;
	}
	public void setType(boolean type) {
		this.type = type;
	}
	public int getGameid() {
		return gameid;
	}
	public void setGameid(int gameid) {
		this.gameid = gameid;
	}
	public String getIphost() {
		return iphost;
	}
	public void setIphost(String iphost) {
		this.iphost = iphost;
	}
	public int getPort() {
		return port;
	}
	public void setPort(int port) {
		this.port = port;
	}
	public int getLoginGameId() {
		return loginGameId;
	}
	public void setLoginGameId(int loginGameId) {
		this.loginGameId = loginGameId;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public InetSocketAddress getIpAddress() {
		return ipAddress;
	}
	public void setIpAddress(InetSocketAddress ipAddress) {
		this.ipAddress = ipAddress;
	}
	public SocketChannel getChannel() {
		return channel;
	}
	public void setChannel(SocketChannel channel) {
		this.channel = channel;
	}
	public boolean isNu() {
		return nu;
	}
	public void setNu(boolean nu) {
		this.nu = nu;
	}
}
